﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPlus.Master" AutoEventWireup="true" CodeBehind="wbfrm_Carnet.aspx.cs" Inherits="FrontEndPlus.Módulos.Administración.wbfrm_Carnet" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" href="css/Estilos.css" type="text/css" media="screen" />

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script src='<%=ResolveUrl("js/jquery.webcam.js") %>' type="text/javascript"></script>
    <link rel="Stylesheet" href="css/Estilos.css" type="text/css" media="screen" />
    <script type="text/javascript">
        var pageUrl = '<%=ResolveUrl("wbfrm_Facturacion_Matricula.aspx") %>';
        $(function () {
            jQuery("#webcam").webcam({
                width: 320,
                height: 240,
                mode: "save",
                swffile: '<%=ResolveUrl("js/jscam.swf") %>',
                debug: function (type, status) {

                },
                onSave: function (data) {
                    $.ajax({
                        type: "POST",
                        url: pageUrl + "/GetCapturedImage",
                        data: '',
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function (r) {
                            $("[id*=imgCapture]").css("visibility", "visible");
                            $("[id*=imgCapture]").attr("src", r.d);
                        },
                        failure: function (response) {
                            alert(response.d);
                        }
                    });
                },
                onCapture: function () {
                    webcam.save(pageUrl);
                }
            });
        });
        function Capture() {
            webcam.capture();
            return false;
        }
    </script>

    <style type="text/css">
        .fancy-green .ajax__tab_header {
            background: url(Imagen/blue_bg_Tab.gif) repeat-x;
            cursor: pointer;
        }

        .fancy-green .ajax__tab_hover .ajax__tab_outer, .fancy-green .ajax__tab_active .ajax__tab_outer {
            background: url(Imagen/blue_left_tab.gif) no-repeat left top;
        }

        .fancy-green .ajax__tab_hover .ajax__tab_inner, .fancy-green .ajax__tab_active .ajax__tab_inner {
            background: url(Imagen/blue_right_Tab.gif) no-repeat right top;
        }

        .fancy .ajax__tab_header {
            font-size: 13px;
            font-weight: bold;
            color: #000;
            font-family: sans-serif;
        }

            .fancy .ajax__tab_active .ajax__tab_outer, .fancy .ajax__tab_header .ajax__tab_outer, .fancy .ajax__tab_hover .ajax__tab_outer {
                height: 46px;
            }

            .fancy .ajax__tab_active .ajax__tab_inner, .fancy .ajax__tab_header .ajax__tab_inner, .fancy .ajax__tab_hover .ajax__tab_inner {
                height: 46px;
                margin-left: 16px; /* offset the width of the left image */
            }

            .fancy .ajax__tab_active .ajax__tab_tab, .fancy .ajax__tab_hover .ajax__tab_tab, .fancy .ajax__tab_header .ajax__tab_tab {
                margin: 16px 16px 0px 0px;
            }

        .fancy .ajax__tab_hover .ajax__tab_tab, .fancy .ajax__tab_active .ajax__tab_tab {
            color: #fff;
        }

        .fancy .ajax__tab_body {
            font-family: Arial;
            font-size: 10pt;
            border-top: 0;
            border: 1px solid #999999;
            padding: 8px;
            background-color: #ffffff;
        }

        .auto-style2 {
            width: 307px;
        }

        .auto-style4 {
            height: 15px;
        }

        .fancy-green {
        }

        .fancy-green {
        }

        .auto-style33 {
            background-image: url('Imagen/CREDENCIALES_6X6.jpg');
            background-repeat: no-repeat;
            width: 101%;
            height: 354px;
        }

        .auto-style64 {
            height: 18px;
        }

        .auto-style69 {
            width: 361px;
        }

        .auto-style80 {
            width: 277px;
            height: 27px;
        }

        .auto-style82 {
            width: 277px;
            }

        .auto-style101 {
            width: 1313px;
            height: 34px;
        }

        .auto-style106 {
        width: 277px;
        height: 57px;
    }
    .auto-style107 {
        width: 361px;
        height: 28px;
    }
    .auto-style108 {
        width: 361px;
        height: 52px;
    }
    .auto-style110 {
        width: 361px;
        height: 41px;
    }
    .auto-style111 {
        width: 1313px;
        height: 41px;
    }
    .auto-style112 {
        width: 280px;
        height: 39px;
    }
    .auto-style113 {
        width: 277px;
        height: 39px;
    }
    .fancy-green {}
    .fancy-green {}
    .fancy-green {}
    .fancy-green {}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="height: 28px">
        <asp:Panel ID="Panel4" runat="server" Height="27px">
            <asp:Image ID="Image2" runat="server" ImageUrl="~/Módulos/Administración/Imagen/FactMat.png" Width="275px" />
        </asp:Panel>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Panel3" runat="server">
                <table align="center" style="background-color: #E8EBF7; border-radius: 10px; filter: alpha(opacity=50);">
                    <tr>
                        <td class="auto-style4"></td>
                        <td align="center" class="auto-style4"></td>
                        <td align="left" class="auto-style2" colspan="3"></td>
                    </tr>
                    <tr>
                        <td class="auto-style4"></td>
                        <td align="center" class="auto-style4">Código del Cliente:</td>
                        <td align="left" class="auto-style2" colspan="3">
                            <asp:TextBox ID="txt_CodCliente" runat="server" MaxLength="48" ReadOnly="True" Width="62px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="auto-style4">
                            <br />
                            <br />
                        </td>
                        <td align="right" class="auto-style4">Identificación: </td>
                        <td class="auto-style2" colspan="3">
                            <asp:TextBox ID="txt_Identificacion" runat="server" MaxLength="10" ReadOnly="True"></asp:TextBox>
                            <asp:ImageButton ID="imgbtn_Busqueda" runat="server" ImageUrl="~/Módulos/Administración/Imagen/icono_lupa.gif" OnClick="imgbtn_Busqueda_Click" CausesValidation="False" />
                        </td>
                    </tr>
                    <tr>
                        <td class="auto-style4">
                            <br />
                            <br />
                        </td>
                        <td align="right" class="auto-style4">Nombre:</td>
                        <td class="auto-style2" colspan="3">
                            <asp:TextBox ID="txt_Nombre" runat="server" MaxLength="48" ReadOnly="True" Width="195px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="auto-style4">
                            <br />
                            <br />
                        </td>
                        <td align="right" class="auto-style4">Apellido:</td>
                        <td class="auto-style2" colspan="3">
                            <asp:TextBox ID="txt_Apellido" runat="server" MaxLength="10" ReadOnly="True" Width="192px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <br />
            <br />
            <br />
            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" CssClass="fancy fancy-green" Width="807px" TabIndex="20" Height="814px">
                <asp:TabPanel ID="tbpn_AsigEntrenador" runat="server"><HeaderTemplate>------------Toma de Carnet------------</HeaderTemplate><ContentTemplate><asp:Panel ID="Panel8" runat="server" Height="744px" Width="758px"><table align="center" style="background-color: #E8EBF7; border-radius: 10px; filter: alpha(opacity=50);" width="650px"><table border="0" cellpadding="0" cellspacing="0"><tr><td align="center" class="auto-style64"><u>Camara</u> </td><td class="auto-style64"></td><td align="center" class="auto-style64">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</td></tr><tr><td><div id="webcam"></div></td><td>&nbsp; <br /><asp:Button ID="btnCapture" runat="server" OnClientClick="return Capture();" Text="Tomar Fotografia" OnClick="btnCapture_Click" /><br /></td></tr></table><asp:Panel ID="Panel10" runat="server" Height="354px" Width="606px"><table class="auto-style33"><tr><td class="auto-style113">&nbsp;</td><td class="auto-style101">&nbsp;</td><td class="auto-style69" rowspan="4">&nbsp;</td></tr><tr><td class="auto-style80"></td><td class="auto-style101" rowspan="5"><asp:Image ID="imgCapture0" runat="server" Height="219px" Style="visibility: hidden; margin-left: 0px; margin-top: 0px;" Width="188px" /></td></tr><tr><td class="auto-style113">&nbsp;</td></tr><tr><td class="auto-style106"></td></tr><tr><td class="auto-style82" rowspan="3"></td><td class="auto-style107"><asp:TextBox ID="txt_Nombre_Carnet" runat="server" Height="16px" ReadOnly="True" Width="172px"></asp:TextBox></td></tr><tr><td class="auto-style108"><asp:TextBox ID="txt_Cedula_Carnet" runat="server" Width="172px" Height="16px" ReadOnly="True"></asp:TextBox></td></tr><tr><td class="auto-style111"></td><td class="auto-style110"><asp:TextBox ID="txt_Numero_Carnet" runat="server" Height="16px" ReadOnly="True" Width="172px"></asp:TextBox></td></tr><tr><td class="auto-style113"></td><td class="auto-style101"></td><td class="auto-style69"><asp:TextBox ID="txt_Telefono_Carnet" runat="server" Width="172px" Height="16px" ReadOnly="True"></asp:TextBox></td></tr></table><br /><br /><asp:Button ID="btn_Guardar" runat="server" Text="Guardar" Height="61px" Width="116px" OnClick="btn_Guardar_Click" /></asp:Panel></table></asp:Panel></ContentTemplate></asp:TabPanel>
            </asp:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

